#include <vector>
#include <iostream>

using namespace std;

// Kadane's algorithm
// 计算最大子数组和
//  vmaxSoFar = max(maxSoFar, current)
// [3, 5, -9, 1, 3, -2, 3, 4, 7, 2, -9, 6, 3, 1, -5, 4]
//  ^current = max(current + array[i], array[i])
//
// i = 1 => num = array[i] = 5
// m = num 
// n = num + maxEnding

// maxEnding = max(m, n)

int kadane(const vector<int> &array) {
  // 
}

int main(int argc, char const *argv[])
{
  /* code */
  return 0;
}
